import { IPSAppDEUIActionGroup } from '../../app/dataentity/ipsapp-deuiaction-group';
import { IPSDEUIActionGroup } from './ipsdeuiaction-group';
import { IPSUIActionGroupDetail } from '../../view/ipsuiaction-group-detail';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEUIActionGroupImpl extends PSModelObjectImpl implements IPSDEUIActionGroup, IPSAppDEUIActionGroup {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get extendMode(): 0 | 2 {
    return this.M.extendMode != null ? this.M.extendMode : 0;
  }

  get groupTag(): string {
    return this.M.groupTag;
  }

  get groupTag2(): string {
    return this.M.groupTag2;
  }

  get groupTag3(): string {
    return this.M.groupTag3;
  }

  get groupTag4(): string {
    return this.M.groupTag4;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  get orderValue(): number {
    return this.M.orderValue != null ? this.M.orderValue : 99999;
  }

  protected psuiactiongroupdetails: IPSUIActionGroupDetail[] | null = null;

  getPSUIActionGroupDetails(): IPSUIActionGroupDetail[] | null {
    if (this.psuiactiongroupdetails == null) {
      this.psuiactiongroupdetails = this.fillChildListModel(this.M.getPSUIActionGroupDetails, 'view.IPSUIActionGroupDetail') as IPSUIActionGroupDetail[];
    }
    return this.psuiactiongroupdetails;
  }

  get psUIActionGroupDetails(): IPSUIActionGroupDetail[] | null {
    return this.getPSUIActionGroupDetails();
  }

  findPSUIActionGroupDetail(objKey: any): IPSUIActionGroupDetail | null {
    return this.getPSModel5('view.IPSUIActionGroupDetail', this.getPSUIActionGroupDetails(), objKey) as IPSUIActionGroupDetail;
  }

  get uniqueTag(): string {
    return this.M.uniqueTag;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get cls(): string {
    return 'PSDEUIActionGroupImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'IPSModelSortable' || cls == 'app.dataentity.IPSAppDEUIActionGroup' || cls == 'dataentity.uiaction.IPSDEUIActionGroup' || cls == 'view.IPSUIActionGroup') return true;
    return super.instanceof(cls);
  }
}
